import request from "./request";

export const delClasses = (id) => request({
  method: `delete`,
  url: `/classes/${id}`,
})

export const editClasses = (id, data) => request({
  method: `put`,
  url: `/classes/${id}`,
  data
})


//获取单个班级信息
export const getClass = (id) => request({
  method: `get`,
  url: `/classes/${id}`,
})

export const getClasses = (params) => request({
  method: 'get',
  url: '/classes',
  params
})

export const exist = (params) => request({
  method: 'get',
  url: '/classes/exist',
  params,
})

export const addClasses = (data) => request({
  method: 'post',
  url: '/classes',
  data,
})

export const edit = (data) => request({
  method: 'get',
  url: '/classes/{id}',
  data,
})

export const editClass = (params) => request({
  method: 'put',
  url: '/classes/{id}',
  params,
})